//
//  YsCloudFileDownloadTools.m
//  YsCloudFileManageSDK
//
//  Created by 宋宏康 on 2020/3/2.
//

#import "YsCloudFileDownloadTools.h"
#import "YsCloudFileDownloadManager.h"
#import "NSArray+QMUI.h"
#import "YsCloudFileDownloadModel.h"

@implementation YsCloudFileDownloadTools

+ (NSString *)renameWithRequestUrl:(NSString *)url withName:(NSString *)name
{

    NSLog(@"url");
  NSArray *queryArray = [YsCloudFileDownloadManager.shareDownloadManger.downloadsArray qmui_filterWithBlock:^BOOL(YsCloudFileDownloadModel *item) {
      return [item.requestUrl isEqualToString:url];
    }];
    NSLog(@"11");
    if (queryArray.count > 0) {
        return [NSString stringWithFormat:@"%@(%zd)",name,queryArray.count];
    }else{
        return name;
    }
}

@end
